#include <iostream>
using namespace std;

int main() {
    string s;
    getline(cin, s);
    int n = s.size();

    int maxLen = 0;
    int wordLen = 0;
    int maxPos = 0;
    for (int i = 0; i < n; i++)
    {
        if (s[i] == '.')
        {
            // 结束
            cout << s.substr(maxPos, maxLen);
            return 0;
        }
        if (s[i] == ' ')
        {
            // 结束一个单词
            wordLen = 0;
        } else {
            wordLen++;
        }
        if (wordLen > maxLen)
        {
            maxLen = wordLen;
            maxPos = i - wordLen + 1;
        }
    }

    return 0;
}